<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>百度ECHarts</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <link href="/css/animate.css" rel="stylesheet">
    <link href="/css/style.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="row  border-bottom white-bg dashboard-header">
        <div class="col-sm-12">
            <p>总体任务执行情况
            </p>

        </div>

    </div>
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
  
            <div class="col-sm-6">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>饼状图</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="graph_flot.html#">
                                <i class="fa fa-wrench"></i>
                            </a>
                      
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="echarts" id="echarts-pie-chart"></div>
                    </div>
                </div>
            </div>
  
        </div>
    </div>
    <!-- 全局js -->
    <script src="/js/jquery.min.js?v=2.1.4"></script>
    <script src="/js/bootstrap.min.js?v=3.3.6"></script>

    <!-- ECharts -->
    <script src="/js/plugins/echarts/echarts-all.js"></script>

    <!-- 自定义js -->
    <script src="/js/content.js?v=1.0.0"></script>


    <!-- ECharts demo data -->
    <script>
    
    $.getJSON('/check/video/count',function(data){
    	
	    var pieChart = echarts.init(document.getElementById("echarts-pie-chart"));	    
	    var pieoption = {
	        title : {
	            text: '任务情况',
	            subtext: '总体视频检测汇总',
	            x:'center'
	        },
	        tooltip : {
	            trigger: 'item',
	            formatter: "{a} <br/>{b} : {c} ({d}%)"
	        },
	        legend: {
	            orient : 'vertical',
	            x : 'left',
	            data:['待检测','正在下载','下载完成','正在检测','检测合格','检测不合格','检测异常']
	        },
	        calculable : true,
	        series : [
	            {
	                name:'访问来源',
	                type:'pie',
	                radius : '55%',
	                center: ['50%', '60%'],
	                data:[
	                    {value:data['wait'], name:'待检测'},
	                    {value:data['downing'], name:'正在下载'},
	                    {value:data['downed'], name:'下载完成'},
	                    {value:data['checking'], name:'正在检测'},
	                    {value:data['success'], name:'检测合格'},
	                    {value:data['failed'], name:'检测不合格'},
	                    {value:data['exception'], name:'检测异常'}
	                ]
	            }
	        ]
	    };
	    pieChart.setOption(pieoption);
	    $(window).resize(pieChart.resize);
    });
    </script>


</body>

</html>
